#!/bin/bash

from=$1
to=$2
subject=$3
body=$4

print_usage()
{
   echo "Usage: $0 <from> <to> <subject> <body>"
   echo "Send an Email."
}

if [ "x$body" == "x" ]; then
   echo "[ERROR] All arguments not available."
   print_usage
   exit 1
fi

echo $body > /tmp/sendmail.sh.log
/data/scripts/sendmail.pl -f "$from" -t "$to" -s "$subject" /tmp/sendmail.sh.log


